/**
 * 问诊配置
 *
 */
import { Utility } from "@/libs/utility"

export const OtherCheckConfigurationsFormConfig = [
	{
		fieldName: "id",
		fieldCNName: "",
		filedValue: "",
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "",
	},
	{
		fieldName: "name",
		fieldCNName: "名称",
		filedValue: "",
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "inputText",
		rules: {
			required: true, // 只有为true的时候才写，为false这个字段不要
			min: 1, // 这里min一定要写在前面！！！！
			max: 50,
		},
		span: 2,
	},
	// {
	//   fieldName: "type",
	//   fieldCNName: "类型",
	//   filedValue: "",
	//   /** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
	//   type: "select",
	//   rules: {
	//     required: true,
	//   },
	//   span: 2,
	//   itemList: [
	//     {
	//       // 类似于name
	//       label: "类型一",
	//       // 类似于id
	//       value: "1",
	//     },
	//     {
	//       // 类似于name
	//       label: "类型二",
	//       // 类似于id
	//       value: "2",
	//     },
	//   ],
	// },
	{
		/** 字段名，如：name */
		fieldName: "sort",
		/** 字段对应的中文解释，如：姓名 */
		fieldCNName: "排序",
		/** 字段的值，如：张三 */
		filedValue: "",
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "inputNumber",
		rules: {
			required: true, // 只有为true的时候才写，为false这个字段不要
		},
		span: 2,
	},

	{
		fieldName: "explains",
		fieldCNName: "说明",
		filedValue: "",
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "textarea",
	},
	{
		fieldName: "options",
		fieldCNName: "选择项配置",
		filedValue: "",
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "checkbox",
		itemList: Utility.getDictList("select_option"),
		rules: {
			required: true, // 只有为true的时候才写，为false这个字段不要
		},
		change: (e) => {
			console.log(e)
		},
	},
	{
		fieldName: "optionNum",
		fieldCNName: "选择项数",
		filedValue: "",
		disabled: true,
		/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		type: "inputNumber",
		span: 2,
	},
]
